package cn.westv.scps.service.sms.masage;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import cn.westv.scps.domain.SmsMessageRecordEntity;
import cn.westv.scps.utils.Page;

public interface ISmsMessageService {

	// 查询所有，带条件查询
	public List<SmsMessageRecordEntity> find(String hql, Class<SmsMessageRecordEntity> entityClass, Object[] params);

	// 获取一条记录
	public SmsMessageRecordEntity get(Class<SmsMessageRecordEntity> entityClass, Serializable id);

	// 分页查询，将数据封装到一个page分页工具类对象
	public Page<SmsMessageRecordEntity> findPage(String hql, Page<SmsMessageRecordEntity> page,
			Class<SmsMessageRecordEntity> entityClass, Object[] params);

	// 新增和修改保存
	public void saveOrUpdate(SmsMessageRecordEntity entity);

	// 批量新增和修改保存
	public void saveOrUpdateAll(Collection<SmsMessageRecordEntity> entitys);

	// 单条删除，按id
	public void deleteById(Class<SmsMessageRecordEntity> entityClass, Serializable id);

	// 批量删除
	public void delete(Class<SmsMessageRecordEntity> entityClass, Serializable[] ids);

	// 执行SQL查询
	public List<SmsMessageRecordEntity> querySQL(String SQL, Object[] params,
			Class<SmsMessageRecordEntity> entityClass);

	// 执行HQL查询
	public <T> T queryHQL(String HQL, Object[] params, Class<T> entityClass);

}
